ElementType Max(ElementType S[], int N)
{
	ElementType max = S[0];
	for (int i = 1; i < N; i++)
	{
		if (max < S[i])
		{
			max = S[i];
		}
	}
	return max;
}